package com.manbu.live.id.generate.provider.service.bo;

import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicLong;

/**
 * @author hanWang
 * @Title:
 * @Package
 * @Description:
 * @date 2024/1/2412:30 PM
 */
public class LocalUnSeqIdBO {
    //mysql 配置的 id
    private Integer id;
    /**
     * 提前将无序的id段存放在这个队列中
     */
    private ConcurrentLinkedQueue<Long> idQueue;

    /**
     * 当前id字段开始值
     */
    private Long currentStart;
    /**
     * 当前id字段结束值
     */
    private Long  nextThreshold;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public ConcurrentLinkedQueue<Long> getIdQueue() {
        return idQueue;
    }

    public void setIdQueue(ConcurrentLinkedQueue<Long> idQueue) {
        this.idQueue = idQueue;
    }

    public Long getCurrentStart() {
        return currentStart;
    }

    public void setCurrentStart(Long currentStart) {
        this.currentStart = currentStart;
    }

    public Long getNextThreshold() {
        return nextThreshold;
    }

    public void setNextThreshold(Long nextThreshold) {
        this.nextThreshold = nextThreshold;
    }
}